

package com.hazelcast.internal.namespace;

import com.hazelcast.jet.config.ResourceType;
import com.hazelcast.nio.serialization.IdentifiedDataSerializable;

public interface ResourceDefinition extends IdentifiedDataSerializable {

    /**
     * Returns the identifier of this resource. For example, for a {@code CLASS} type resource it can be the fully-qualified
     * name of the class.
     *
     * @return the identifier of this resource.
     */
    String id();

    /**
     * @return the type of the resource.
     */
    ResourceType type();

    /**
     * @return the contents of the resource.
     */
    byte[] payload();

    /**
     * @return the path of the resource
     */
    String url();

    /**
     * Sets the path of the resource
     *
     * @param url the path of the resource
     */
    void setUrl(String url);
}
